package com.geek.netty.router;

import java.util.List;
import java.util.Random;

/**
 * @program geek
 * @description: route
 * @author: chanzhugang
 * @create: 2021/04/04 13:06
 */
public class RandomHttpEndPointRouter implements HttpEndPointRouter {

    @Override
    public String route(List<String> urls) {
        int size = urls.size();
        Random random = new Random(System.currentTimeMillis());
        return urls.get(random.nextInt(size));
    }
}